package asia.doing.controller.user;
import asia.doing.common.Result;
import asia.doing.entity.Collect;
import asia.doing.service.user.FrontCollectService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController(value = "frontCollectController")
@RequestMapping("/front/collect")
public class FrontCollectController {
    @Resource
    private FrontCollectService frontCollectService;

    //收藏与取消
    @PostMapping("/set")
    public Result set(@RequestBody Collect collect){
        frontCollectService.set(collect);
        return Result.success();
    }
}
